package com.squirrel.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 *  UserSubscription 用户联系
 * </p>
 *
 * @author 关远键
 * @since 2021/11/11 16:06
 */
@Data
@TableName("user_subscription")
@ApiModel(value = "用户联系", description = "")
public class UserSubscription extends Model<UserSubscription> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户关注id")
    @TableId(value = "user_ subscription_id", type = IdType.AUTO)
    private Integer userSubscriptionId;

    @ApiModelProperty("进行关注的用户id")
    @TableField("from_user_id")
    private Integer fromUserId;

    @ApiModelProperty("被关注的用户id")
    @TableField("to_user_id")
    private Integer toUserId;

    @ApiModelProperty("关注时间")
    @TableField("subscription_time")
    private LocalDateTime subscriptionTime;


    @Override
    public Serializable pkVal() {
        return this.userSubscriptionId;
    }

}
